//
//  coolkeysHeader.h
//  coolkeys
//
//  Created by yww on 31/07/2017.
//  Copyright © 2017 yww. All rights reserved.
//

#ifndef coolkeysHeader_h
#define coolkeysHeader_h

#define WeakSelf __weak typeof(self) weakSelf = self
#define StrongSelf  __strong __typeof__(self) strongSelf = weakSelf

#define KdeviceWidth  [[UIScreen mainScreen] bounds].size.width
#define KdeviceHeight [[UIScreen mainScreen] bounds].size.height
#define StatusHeight  [[UIApplication sharedApplication] statusBarFrame].size.height
#define NavigationHeight self.navigationController.navigationBar.frame.size.height
#define TabBarHeight  self.tabBarController.tabBar.frame.size.height
#define kAppDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate])
#define COLOR(R, G, B, A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A]
#define ColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#endif
#ifdef DEBUG
#define NSLog(s, ... ) NSLog( @"[%@ in line %d] => %@", [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )

#else
#define NSLog(s, ... )

#endif /* coolkeysHeader_h */
